package com.jcl.recruit.resume.service;

import com.jcl.recruit.resume.logic.ResumeProjectLogic;
import com.jcl.recruit.resume.model.ResumeProject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 刘明新
 * @date 2018/8/6 下午1:42
 */
@Service
public class ResumeProjectService {

    @Autowired
    private ResumeProjectLogic resumeProjectLogic;

    public int insertSelective(ResumeProject record) {
        return resumeProjectLogic.insert(record);
    }

    public int updateByPrimaryKeySelective(ResumeProject record) {
        return resumeProjectLogic.updateByPrimaryKey(record);
    }

    public void insertOrUpdateResumeProject(ResumeProject resumeProject) {
        if (resumeProject.getId() == null) {
            this.insertSelective(resumeProject);
        } else {
            this.updateByPrimaryKeySelective(resumeProject);
        }
    }

    public int isExitResumeProject(ResumeProject resumeProject) {
        return resumeProjectLogic.isExitEntity(resumeProject);
    }

    public int deleteResumeProject(Integer id) {
        return resumeProjectLogic.deleteById(id);
    }

}
